package com.yunche.yunchebusiness.mvp.model

import com.yunche.yunchebusiness.base.BaseResponse
import com.yunche.yunchebusiness.base.rx.SchedulerUtils
import com.yunche.yunchebusiness.entity.LoginEntity
import com.yunche.yunchebusiness.network.RetrofitManager
import io.reactivex.Observable
import okhttp3.RequestBody

/**
 * Create by Crcker on 2018/12/25 10:32
 * Email: Crcker@163.com
 */


class LoginModel {
    fun login(requestBody: RequestBody): Observable<BaseResponse<LoginEntity>> {
        return RetrofitManager.service.login(requestBody).compose(SchedulerUtils.ioToMain())
    }
}